<?php

class Exam_Model_Faqcategory extends Core_Model_Item_Abstract {
    public function getITemCategory($category_id) {
        $table = Engine_Api::_()->getDbTable('faqcategories','Exam');
        $select = $table->select()->where('faqcategory_id=?',$category_id);
        return $table->fetchRow($select);
    }
    protected function _postDelete() {
        //delete all QA
        $table = Engine_Api::_()->getDbTable('faqs', 'Exam');
        $where = $table->getAdapter()->quoteInto('faqcategory_id = ?', $this->getIdentity());
        $table->delete($where);
    }
}